<div id="retail_wrapper">
    <?php
    $col = 3;
    echo '<table id="retail"><tr>';
    $cnt = 0;
    $id = 1;
    foreach ($data as $row) {
        if ($cnt >= $col) {
            echo "</tr><tr>";
            $cnt = 0;
        }
        $cnt++;
        ?>
        <td>
            <div class="wrapper_img">
                <div class="retail_top">
                    <table width="100%">
                        <tr>
                            <td valign="top"><img src="<?= base_url() . 'res/images/retail.png'; ?>" width="110px"/></td>
                            <td valign="top">
                                <h2>Total Penjualan</h2>
                                <h3>Rp. 15.121.233</h3>
                                <h2>Stok Barang</h2>
                                <h3>0</h3>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="description_img">
                    <a href="<?= base_url() . 'retail/view/'.$row->koderetail; ?>"><?= $row->namaretail;?></a>
                </div>
            </div>
        </td>
        <?php
        $id++;
    }
    echo "</tr></table>";
    ?>
    
</div>